<template>
  <div class="reviews px15 py20 bgc12">
    <h1 class="fz18 lh14n pb15">用户测评</h1>
    <div class="reviewlist">
      <reviewcard v-for="(item, idx) in reviews" :key="idx" :review="item" class="w100p flx-s-0"/>
    </div>
    <a href="/" class="fz12 clr5 d-block bgc13 w100p lh40 flx-mm mt20">查看更多评测</a>
  </div>
</template>

<script>
import reviewcard from "./reviewcard"
export default {
  components: {
    reviewcard
  },
  data() {
    return {
      reviews: []
    }
  },
  async created () {
    let { status, data } = await await this.$axiosApi.getIndexReviews()
    if (status === 200 && data.code === 0) {
      this.reviews = data.data
    }
  }
}
</script>

<style scoped lang="stylus">
.reviewlist
  col-layout(2, 10px)
</style>
